unit uRemark;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxContainer, cxEdit, dxSkinsCore, dxSkinBlack,
  dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
  dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
  dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
  dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
  dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
  dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
  dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinPumpkin, dxSkinSeven,
  dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
  dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
  dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
  dxSkinXmas2008Blue, cxGroupBox, cxTextEdit, cxMemo, Vcl.Menus, Vcl.StdCtrls,
  cxButtons;

type
  TFrmRemark = class(TForm)
    mmoRemark: TcxMemo;
    cxGroupBox1: TcxGroupBox;
    btnSave: TcxButton;
    btnCancel: TcxButton;
    procedure btnCancelClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmRemark: TFrmRemark;
  procedure FrmRemarkShow(var sText:string;var IsSave:Boolean);
implementation

{$R *.dfm}

uses ucommFunction;

procedure FrmRemarkShow(var sText:string;var IsSave:Boolean);
begin
  Application.CreateForm(TFrmRemark, FrmRemark);
  with FrmRemark do
  try
    if ShowModal=mrOk then
    begin
      sText:=mmoRemark.Text;
      IsSave:=True;
    end else
      IsSave:=False;
  finally
    FreeAndNil(FrmRemark);
  end;

end;

procedure TFrmRemark.btnCancelClick(Sender: TObject);
begin
  Self.Close;
  FrmRemark:=nil;
end;

procedure TFrmRemark.FormCreate(Sender: TObject);
begin
  pSetCaption(Self);
end;

end.
